﻿using System.ComponentModel.DataAnnotations;
using NetSurveillance.WebApp.Filters;

namespace NetSurveillance.WebApp.Models
{
    public class HostScanModel
    {
        [Required(AllowEmptyStrings = false)]
        [RegularExpression(@"^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$", ErrorMessage = "Ip格式不正确")]
        [Display(Name = "开始IP地址")]
        public string StartIP { get; set; }

        [Required(AllowEmptyStrings = false)]
        [RegularExpression(@"^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$", ErrorMessage = "Ip格式不正确")]
        [Display(Name = "结束IP地址")]
        public string EndIP { get; set; }
    }
}